package com.zuo.demo01.service.impl;


import com.zuo.demo01.dao.UserMapper;
import com.zuo.demo01.pojo.User;
import com.zuo.demo01.service.UserService;
import com.zuo.demo01.utils.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> selectAll() {
        return userMapper.selectAll();
    }

    @Override
    public User login(User user) {
        //System.out.println(this.getClass().getSimpleName()+"->"+user.getPassword());
        return userMapper.login(user);
    }

    @Override
    public int update(Map<String,Object> map) {
        return userMapper.update(map);
    }

    @Override
    public User findByName(String username) {
        return userMapper.findByName(username);
    }


}
